var http = require('../../utils/http.js')
var app = getApp();
var img = require('../../utils/imgutil.js')
Page({

    /**
     * 页面的初始数据
     */
    data: {
        mywh: ""
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
        var that = this;
        that.data.mywh = options.code
        that.init();

    },

    init: function () {
        var that = this;
        http.httppost('InventoryData/FindScanInfo?str=' + '591019b497749f4b', {}, function (res) {
            wx.hideToast();
            res.BuyerBilling.Cover = img.getUrl(res.BuyerBilling.Cover, 800)

            console.log(res)

            that.setData({
                list: res
            })
        }, 'GET')


    },
    bindImage:function(e){
        wx.previewImage({
            current: this.data.list.BuyerBilling.Cover, // 当前显示图片的http链接
            urls: [this.data.list.BuyerBilling.Cover] // 需要预览的图片http链接列表
        })
    }
})